<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2019/3/30
 * Time: 15:35
 */

namespace api\storage\common;


use api\storage\exception\TypeNotFoundException;
use api\storage\service\client\ApkClientService;
use api\storage\service\client\JarClientService;

class ClientFactory
{
    public static function getService($type){
        switch ($type) {
            case 'apk':
                return new ApkClientService();
                break;
            case 'jar':
                return new JarClientService();
                break;
            default:
                throw new TypeNotFoundException();
        }
    }
}